package com.wbcs.config.template.tags;

import com.wbcs.system.ReportRequest;
import com.wbcs.system.assistant.TagAssistant;
import com.wbcs.system.component.AbsComponentType;
import com.wbcs.util.Consts_Private;

public class SFileUploadTag extends AbsTagInTemplate
{
    public SFileUploadTag(AbsTagInTemplate parentTag)
    {
        super(parentTag);
    }

    @Override
	public String getTagname()
    {
        return Consts_Private.TAGNAME_FILEUPLOAD;
    }

    @Override
	public String getDisplayValue(ReportRequest rrequest,AbsComponentType ownerComponentObj)
    {
        String maxsize=null;
        String allowtypes=null;
        String uploadcount="1";
        String newfilename=null;
        String savepath=null;
        String rooturl=null;
        String popupparams=null;
        String initsize=null;
        String interceptor=null;
        if(this.mTagAttributes!=null)
        {
            maxsize=this.mTagAttributes.get("maxsize");
            allowtypes=this.mTagAttributes.get("allowtypes");
            uploadcount=this.mTagAttributes.get("uploadcount");
            newfilename=this.mTagAttributes.get("newfilename");
            savepath=this.mTagAttributes.get("savepath");
            rooturl=this.mTagAttributes.get("rooturl");
            popupparams=this.mTagAttributes.get("popupparams");
            interceptor=this.mTagAttributes.get("interceptor");
            initsize=this.mTagAttributes.get("initsize");
        }
        return TagAssistant.getInstance().getFileUploadDisplayValue(maxsize,allowtypes,uploadcount,
                newfilename,savepath,rooturl,popupparams,initsize,interceptor,this.tagContent,rrequest.getRequest());
    }
}
